package com.woniuxy.controller;

import com.woniuxy.entity.RbacManager;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @Author 罗蔚
 * @Date 2022/4/1 14:39
 * @Description TODO
 */
@Controller
//@ResponseBody
@RequestMapping("/rbacManager")
public class RbacManagerController {
    @GetMapping("/User")
    public String findAll(){
        System.out.println("RbacManagerController.findAll：active！");
        return "/index.jsp";
    }
    @PostMapping("/User")
    public String addOne(@RequestBody RbacManager rbacManager){
        return "post请求："+rbacManager.toString();
    }
    @PutMapping("/User")
    public String updateOne(@RequestBody RbacManager rbacManager){
        return "put请求："+rbacManager.toString();
    }
    @DeleteMapping("/User/{id}")
    public String deleteOne(@PathVariable int id){
        return "删除了这个"+id+"的用户";
    }
}